﻿using System;
// using ByteDance.Union;

namespace Runtime.ADAggregator
{
    public class ADListener 
        //: IRewardAdInteractionListener
    {
        public Action<bool> onVideoComplete;
        public Action       onClose;
    
        public void OnAdClose()
        {
            onClose?.Invoke();
            onClose = null;
        }

        public void OnShowError()
        {
            onVideoComplete?.Invoke(false);
            onVideoComplete = null;
        }
    
        public void OnShowComplete()
        {
            onVideoComplete?.Invoke(true);
            onVideoComplete = null;
        }
    
        public void OnRewardVerify(bool rewardVerify, int rewardAmount, string rewardName)
        {
            onVideoComplete?.Invoke(rewardVerify);
            onVideoComplete = null;
        }
    }
}